package com.kingyea.mobilepolice.orgjobcategory.service.impl;

import com.kingyea.mobilepolice.orgjobcategory.bean.OrgDictionaryJobCategory;
import com.kingyea.mobilepolice.orgjobcategory.bean.OrgDictionaryJobCategoryCondition;
import com.kingyea.mobilepolice.orgjobcategory.dao.OrgDictionaryJobCategoryMapper;
import com.kingyea.mobilepolice.orgjobcategory.service.OrgDictionaryJobCategoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Mr.Lin
 * @version v1.0.0
 * @description OrgDictionaryJobCategory 实现类
 * @date Created in 2018-04-26 15:24:48
 */
@Service
@Transactional
public class OrgDictionaryJobCategoryServiceImpl implements OrgDictionaryJobCategoryService {

    private static final Logger LOGGER = LoggerFactory.getLogger(OrgDictionaryJobCategoryServiceImpl.class);

    @Resource
    private OrgDictionaryJobCategoryMapper orgDictionaryJobCategoryMapper;

    /**
     * 列表
     *
     * @param
     * @return
     */
    @Override
    public List<OrgDictionaryJobCategory> search(OrgDictionaryJobCategoryCondition condition) {
        List<OrgDictionaryJobCategory> list = orgDictionaryJobCategoryMapper.search(condition);
        return list;
    }

    /**
     * 删除
     *
     * @param
     * @return
     */
    @Override
    public Boolean deleteByOrgSerialNo(String orgSerialNo) {
        return orgDictionaryJobCategoryMapper.deleteByOrgSerialNo(orgSerialNo) > 0;
    }

    /**
     * 保存
     *
     * @param orgDictionaryJobCategory
     * @return
     */
    @Override
    public Boolean save(OrgDictionaryJobCategory orgDictionaryJobCategory) {
        return orgDictionaryJobCategoryMapper.save(orgDictionaryJobCategory) > 0;
    }

}
